<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>이슈등록</title>
</head>
<body>

	<div id="project_content">
	<form action="/projects/doraemon/issue" method="post" name="newform" id="newform" enctype="multipart/form-data">
	<input type="hidden" name="form_key" value="2c0acf45d8a5310ce3ef6bb66d978d22">
		<div class="issue_write">
						
			<input type="text" id="summary" name="summary" class="issue_subject" title="요약" value="">
			<input type="hidden" name="summary_change_flag" value="1">
			<input type="hidden" name="pin_id" value="1">
			<div class="resizable-textarea" style="position:relative"><!-- IE hack --> 
			<div class="resizable-textarea"><textarea id="details" name="details" rows="" cols="" class="issue_cons_box resizable" style="margin-bottom: 0px; width: 808px; height: 337px; "></textarea><div class="grippie"><span></span></div></div>
			</div>
			
						<script type="text/javascript">
/*<![CDATA[*/
function addRow(id, name, size) {
    if (size == undefined)
        size = 41;
    if((tmpbutton = document.getElementById(id).getElementsByTagName('button').item(0)) != undefined)
	tmpbutton = tmpbutton.clientWidth;

    // check editform
    var editform = document.getElementById('editform');
    if (editform) {
        var iframe = document.getElementById('upload-iframe');
        if (!iframe) {
            if (document.all)
                iframe = document.createElement('<iframe frameBorder="0" name="upload-iframe" width="1px" height="1px">');
            else
                iframe = document.createElement('iframe');
            iframe.setAttribute('id','upload-iframe');
            iframe.setAttribute('name','upload-iframe');
            iframe.setAttribute('style','display:none;border:0;');
            //iframe.setAttribute('style','border:0;');
            var body = document.getElementsByTagName('body')[0];
            body.appendChild(iframe);
        }
    }
    var fform = document.getElementById(id);
    var lastRow = fform.rows.length;
    var row = fform.insertRow(lastRow);

    var cell = row.insertCell(0);
    var div = document.createElement('div');
    div.setAttribute('style', 'position:relative');
    var newInput = document.createElement('input');
    newInput.setAttribute('type', 'file');
    newInput.setAttribute('name', name+'[]');
    newInput.setAttribute('size', size);

    var tmpstyle = "width:80px;";
    if(tmpbutton != undefined)
	tmpstyle = "width:" + tmpbutton + "px;";
    else 
	tmpbutton = 80; // set 80px for IE

    newInput.style.position = 'absolute'; // IE
    newInput.style.left = -8; // IE
    newInput.style.width = tmpbutton+3; // IE
    newInput.setAttribute('style', 'position:absolute;left:-5;'+tmpstyle);

    var btn = document.getElementById('button-' + id);
    if (btn) {
        btn.setAttribute('style','display:none;');
        btn.style.display = 'none';
    }
    newInput.className = 'form-file';
    // get basename with replace() for IE
    newInput.onchange = function() {
	// add new row if and only if this input element is in the bottom row of upload table
	this_row = this.parentNode.parentNode.parentNode.parentNode;
	this_table = this_row.parentNode;
	if (this_row.nextElementSibling == null) {
		addRow(id, name, size);
                // Delete the 'Choose file' button right on the file input.
                this.parentNode.style.display = 'none';
	}

        fakeInp.style.display='inline-block';
        fakeInp.value = this.value.replace(/^.*[\\]/g, '');
        var btn = document.getElementById('button-' + id);
        if (btn) {
            btn.setAttribute('style','display:inline-block;');
            btn.style.display = 'inline-block';
        }
    };

    var span = document.createElement('span');
    span.style.position='relative';
    var fakeInp = document.createElement('input');
    fakeInp.setAttribute('type', 'text');
    fakeInp.setAttribute('size', size);
    fakeInp.className = 'fake-file';
    fakeInp.setAttribute('readonly', 'true');
    fakeInp.style.display = 'none';
    if (document.all)
        fakeInp.readOnly = true; // for IE
    fakeInp.onclick = function() { delRow(id,this); };

    var addbtn = document.createElement('button');
    var span2 = document.createElement('span');
    var txt = document.createTextNode('파일찾기');
    span2.appendChild(txt);
    addbtn.appendChild(span2);
    addbtn.setAttribute('onclick',"return false;");
    addbtn.className = 'add-file';

    div.appendChild(fakeInp);
    span.appendChild(addbtn);
    span.appendChild(newInput);
    div.appendChild(span);
    cell.appendChild(div);
    /* newInput.click(); /* */}

function delRow(id,obj) {
    obj.parentNode.parentNode.parentNode.parentNode.removeChild(obj.parentNode.parentNode.parentNode);
    var form = document.getElementById("form-" + id);
    var inputs = form.getElementsByTagName('input');
    var mysubmit = null;
    for (i = 0; i < inputs.length; i++) {
        if (inputs[i].type == 'file' && inputs[i].value != '') {
            return;
        }
    }
    var btn = document.getElementById('button-' + id);
    if (btn) btn.style.display = 'none';
}

function check_attach(id) {
    // check if the form has attached files.
    attach = document.getElementById(id);
    var ok = false;
    inputs = attach.getElementsByTagName('input');
    for (i = 0; i < inputs.length; i++) {
        if (inputs[i].type == 'file' && inputs[i].value != '') {
            ok = true;
            break;
        }
    }
    if (ok == false)
        return false;
    // check editform
    var editform = document.getElementById('editform');
    if (editform) {
        // iframe upload
        iframe = document.getElementById('upload-iframe');
        var attachform = document.getElementById('form-'+id);
        if (attachform) {
            attachform.setAttribute('target', 'upload-iframe');
        }

        // TODO check success or fail
        setTimeout("iframe.parentNode.removeChild(iframe);resetForm(attach)", 1500);
        //alert(_("Successfully Uploaded"));
        return ok;
    }
    return ok;
}

function resetForm(form) {
    inputs = form.getElementsByTagName('input');
    var name = "input_file", size = 41; // default
    for (i = 0; i < inputs.length; i++) {
        if (inputs[i].type == 'file') {
            name = inputs[i].getAttribute('name');
            size = inputs[i].getAttribute('size');
            break;
        }
    }

    if (form && form.rows.length) { // for UploadForm
        for (var i=form.rows.length;i>0;i--) {
            form.deleteRow(i-1);
        }
    }
    name = name.replace(/\[\]$/g, '');
    addRow(form.getAttribute('id'), name, size);
}

/*]]>*/
</script>  <div id="form-upload1">
  <div class="uploadForm">
  <!-- input type='hidden' name='action' value='UploadFile' -->  <table border="0" cellspacing="0" cellpadding="0">
    <tbody><tr>
      <td valign="top" rowspan="2">
        <span onclick="addRow('upload1','input_file')" class="icon-clip" title="add files">첨부</span>
      </td>
      <td>
        <table cellspacing="0" cellpadding="0" border="0">
          <tbody id="upload1">
                <tr style="display: none;"><td></td></tr>
          <tr><td><div style="position:relative"><input type="text" size="41" class="fake-file" readonly="true" style="display: none; "><span style="position: relative; "><button onclick="return false;" class="add-file"><span>파일찾기</span></button><input type="file" name="input_file[]" size="41" style="position:absolute;left:-5;width:80px;" class="form-file"></span></div></td></tr></tbody>
        </table>
      </td>
    </tr>
    <tr>
      <td>
      <div class="buttons">
  <!-- button type='button' class='add-file' onclick="addRow('upload1','input_file')"><span>파일추가</span></button -->
  <input type="hidden" name="upload1" value="upload1">
  <input type="hidden" name="popup" value="1">      </div>
      </td>
    </tr>
  </tbody></table>
  </div>
  </div>
<script type="text/javascript">
/*<![CDATA[*/
(function () {
    var btn = document.getElementById('button-upload1');
    if (btn) btn.style.display = 'none';
})();
addRow('upload1','input_file');
/*]]>*/
</script>
						
			<!--관리자정보변경-->					

						 <div class="con_info_modify">
				<a href="javascript: void(0);" class="btn_style06" id="show_tracker_items_button" onclick="$('#admin_artifact_status').css('display',''); $('#show_tracker_items_button').css('display','none'); $('#hide_tracker_items_button').css('display','');" style="display: none; "><span><img src="/themes/naver/images/bu_green_arrow.jpg" width="5" height="3" alt="">세부 정보 보이기</span>
</a>
				<a href="javascript: void(0);" class="btn_style06" style="" id="hide_tracker_items_button" onclick="$('#admin_artifact_status').css('display', 'none'); $('#show_tracker_items_button').css('display',''); $('#hide_tracker_items_button').css('display','none'); "><span><img src="/themes/naver/images/bu_green_arrow.jpg" width="5" height="3" alt="">세부 정보 숨기기</span>
</a>

				세부정보를 입력하시면 이슈를 보다 자세하게 파악할 수 있습니다.
				
				<div id="admin_artifact_status" style="">
									<div class="con_info_modify01">
    <table style="width: 100%">
            <tbody><tr>
            <td style="padding:0 0 6px 0;">
            <span class="item01">중요도</span>
        </td>
        <td style="padding:0 0 6px 0;">
                                <select name="Priority">
                                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3" selected="selected">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                            </select>
        </td>
                    <td style="padding:0 0 6px 0;">
            <span class="item01">담당자</span>
        </td>
        <td style="padding:0 0 6px 0;">
                                <select name="Assignee">
                                                <option value="100" selected="selected">Nobody</option>
                                <option value="279070">doraemon</option>
                                <option value="50674">markan</option>
                            </select>
        </td>
        </tr>
            </tbody></table>
</div>				
				<div class="con_info_modify02">
    <table style="width: 100%">
            <tbody><tr>
                    <td style="padding:0 0 6px 0;">
            <span class="item01">영향</span>
        </td>
        <td style="padding:0 0 6px 0;">
                                <select name="extra_fields[34810]">
                                                <option value="100">없음</option>
                                <option value="251272">작동불능</option>
                                <option value="251273">치명적</option>
                                <option value="251274">주요</option>
                                <option value="251275">일반</option>
                                <option value="251276">부분</option>
                                <option value="251277">간단</option>
                                <option value="251278">개선</option>
                            </select>
        </td>
                    <td style="padding:0 0 6px 0;">
            <span class="item01">진단유형</span>
        </td>
        <td style="padding:0 0 6px 0;">
                                <select name="extra_fields[34811]">
                                                <option value="100">없음</option>
                                <option value="251279">버그 확인</option>
                                <option value="251280">수정됨</option>
                                <option value="251281">수정 안함</option>
                                <option value="251282">버그 아님</option>
                                <option value="251283">응답 대기</option>
                                <option value="251284">재현 불가</option>
                                <option value="251285">중복</option>
                                <option value="251286">잘동작함</option>
                            </select>
        </td>
        </tr>
            </tbody></table>
</div>				</div>

			 </div>	
						 <!--// 관리자정보변경-->
			 
			 <div class="write_btns">
				<a href="#" class="btn_style09" onclick="
				if ($('#summary').val().length &lt;= 2)
					{ message_box('제목 또는 요약은 최소 세글자 이상이어야 합니다.'); return false; }
				else if($('#summary').value == '요약을 입력하세요')
					{ message_box('사용할 수 없는 제목입니다.'); $('#summary').focus(); $('#summary').value = '';	return false; }

				else if($('#details').val().length &lt;= 2)
					{ message_box('메시지 본문이 너무 짧습니다. 최소 3 글자 이상어야 합니다.'); $('#details').focus(); return false; }

				else { form_submit('newform'); }"><span>제출</span></a>
				<a href="/projects/doraemon/issue" class="btn_style11"><span>취소</span></a>
			 </div>
		 </div>
	</form>
</div>
</body>
</html>